    #include <stdio.h>
     
      int main(void){
    	typedef struct valor v;
    	struct valor{
    	  int opc, ass;
    	  char car;	
    	};
    	v vl;
    	printf("1: obter ascii\n2: obter caractere\nopc: ");
    	scanf("%d", &vl.opc);
    	getchar();
    	switch(vl.opc){
    	  case 1:
    	    printf("Caractere: ");
    	    scanf("%c", &vl.car);
    	    printf("ASCII code-> %d\n", vl.car);	
    	  break;
    	  case 2:
    	    printf("ASCII code: ");
    	    scanf("%d", &vl.ass);
    	    printf("Caractere-> %c\n", vl.ass);
    	  break;
    	  default:{
    		printf("Hum?\n");
    	  }
    	}
     
     
      return 0;  
      }
     
